# -*- coding: utf-8 -*-
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
#作者：cacho_37967865
#博客：https://blog.csdn.net/sinat_37967865
#文件：tensorflow_mnist_info.py
#日期：2019-11-12
#备注：单层神经网络进行训练
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

import numpy as np

from tensorflow.examples.tutorials.mnist import input_data

mnist = input_data.read_data_sets('F:\PythonProject\Mnist', one_hot=True)

# 训练集60000 和测试集10000,但在input_data中，人为增加了验证集，默认5000 张图片
train_images = mnist.train.images        # numpy.ndarray
train_labels = mnist.train.labels        # numpy.ndarray
valid_images = mnist.validation.images
valid_labels = mnist.validation.labels
test_images = mnist.test.images
test_labels = mnist.test.labels

# 所以，最终有3个数据集：训练集、验证集、测试集
print(train_images.shape)               # (55000, 784)
print(train_labels.shape)               # (55000, 10)
print(valid_images.shape)               # (5000, 784)
print(valid_labels.shape)               # (5000, 10)
print(test_images.shape)                # (10000, 784)
print(test_labels.shape)                # (10000, 10)